import Http from '../http';

export const login = function(loginForm: any) {
    return Http.post('/api/user/login', loginForm)
}

export const register = function(registerForm: any) {
    return Http.post('/api/user/register', registerForm)
}

export const logout = function(params: any) {
    return Http.get('/api/user/logout', params)
}

export const password_modify = function(params: any) {
    return Http.post('/api/user/password', params)
}

export const viewUser = function(params: any) {
    return Http.get('/api/user/detail', params)
}

export const updateUser = function(params: any) {
    return Http.post('/api/user/update', params)
}

export const deleteUser = function(params: any) {
    return Http.get('/api/user/delete', params)
}

export const getProducts = function(params: any) {
    return Http.get('/api/user/get_product', params)
}

export const getUserList = function(data: any) {
    return Http.post('/api/user/list', data)
}

export const setUserRole = function(params: any) {
    return Http.get('/api/user/set_owner', params)
}